package cn.com.gzheroli.dubbo;

import java.io.IOException;

import org.apache.log4j.Logger;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import com.alibaba.dubbo.container.Main;

import cn.com.gzheroli.bfw.pojo.base.TSUser;
import cn.com.gzheroli.core.common.service.SystemService;
import cn.com.gzheroli.service.bfw.UserService;


public class DubboTest1 {
	static Logger log = Logger.getLogger(DubboTest1.class.getName());
	@SuppressWarnings("resource")
	public static void main(String[] args) {
		 ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(  
				  /*new String[]{"applicationContext.xml","spring-database.xml","spring-dubboProvider.xml"});  */
		 new String[]{"spring-dubboProvider.xml"}); 
		 				System.out.println("Press any key to exit.11111");  
				        context.start();  
				        System.out.println("Press any key to exit.2222222");  
				        SystemService systemService=(SystemService)context.getBean("systemService");
						 systemService.getInitAllTypeGroups("");
						 System.out.println("Press any key to exit.");  
				        try {
					      System.in.read();
					    } catch (IOException e) {
					      // TODO Auto-generated catch block
					      e.printStackTrace();
					    } 
				       /* UserService userService=(UserService)context.getBean("userService");
				        TSUser user=new TSUser();
				        user.setUserName("admin");
				        user.setPassword("admin1!");
				        TSUser user1=userService.checkUserExits(user);
				        System.out.println(user1.getRealName());*/
		//Main.main(args);
	}

}
